<HTML>
<HEAD>
<TITLE>
Clave.cpp
</TITLE>
</HEAD>
<BODY>
<PRE>
<font color="blue">#include</font> <font color="maroon">"Clave.h"</font>

<font color="blue">int</font> Clave<font color="black">:</font><font color="black">:</font>Comparar<font color="black">(</font>Informacion <font color="black">*</font>DatoAComparar<font color="black">)</font>
<font color="black">{</font>
    <font color="blue">return</font> memcmp<font color="black">(</font><font color="blue">this</font><font color="black">-</font><font color="black">&#62;</font>clave, DatoAComparar<font color="black">-</font><font color="black">&#62;</font>info, tamanioClave<font color="black">)</font>;
<font color="black">}</font>

<font color="blue">void</font> Clave<font color="black">:</font><font color="black">:</font>Cargar<font color="black">(</font><font color="blue">char</font> <font color="black">*</font>info<font color="black">)</font>
<font color="black">{</font>
    <font color="blue">if</font><font color="black">(</font>clave<font color="black">)</font>
        free<font color="black">(</font>clave<font color="black">)</font>;

    clave<font color="black">=</font>info;
<font color="black">}</font>

<font color="blue">int</font> Clave<font color="black">:</font><font color="black">:</font>Comparar<font color="black">(</font>Clave <font color="black">*</font>DatoAComparar<font color="black">)</font>
<font color="black">{</font>
    <font color="blue">return</font> memcmp<font color="black">(</font><font color="blue">this</font><font color="black">-</font><font color="black">&#62;</font>clave, DatoAComparar<font color="black">-</font><font color="black">&#62;</font>clave, tamanioClave<font color="black">)</font>;
<font color="black">}</font>

Clave<font color="black">:</font><font color="black">:</font>Clave<font color="black">(</font><font color="blue">int</font> tamanioClave<font color="black">)</font>
<font color="black">{</font>
    <font color="blue">this</font><font color="black">-</font><font color="black">&#62;</font>tamanioClave<font color="black">=</font>tamanioClave;
<font color="black">}</font>

Clave<font color="black">:</font><font color="black">:</font>~Clave<font color="black">(</font><font color="black">)</font>
<font color="black">{</font>
    <font color="blue">if</font><font color="black">(</font>clave<font color="black">)</font>
        free<font color="black">(</font>clave<font color="black">)</font>;
<font color="black">}</font>

</PRE>
</BODY>
</HTML>
